import { defineStore } from 'pinia'
import { store } from '@/store';

export const useUserStore = defineStore({
    state: () => ({
        userInfo: null,
    }),
    getters: {
        getUserInfo() {
            return this.userInfo
        }
    },
    actions: {
        setUserInfo(){
            this.userInfo = {
                name: '张三'
            }
        }
    },
})

export function useUserStoreWithOut() {
    return useUserStore(store)
}
